@extends('admin.layout.master')

@section('content')
    <section class="Hui-article-box">
        <nav class="breadcrumb">
            <i class="Hui-iconfont">&#xe67f;</i> 首页
            <span class="c-gray en">&gt;</span> 分类管理
            <span class="c-gray en">&gt;</span> 新增车型
            <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" >
                <i class="Hui-iconfont">&#xe68f;</i>
            </a>
        </nav>
        <div class="pd-20">
            <form class="form form-horizontal" method="post" action="">
                {{ csrf_field() }}

                <div class="row cl">
                    <label class="form-label col-xs-2 col-sm-1"><span class="c-red">*</span>所属车厂：</label>
                    <div class="formControls col-xs-4 col-sm-5">
                        <span class="select-box">
                            <select name="factory_id" class="select">
                                <option value="">--请选择--</option>
                                @foreach($factories as $factory)
                                    <option value="{{ $factory->id }}"
                                            {{ old('factory_id') == $factory->id ? 'selected' : '' }}
                                    >
                                        {{ $factory->name }}
                                    </option>
                                @endforeach
                            </select>
                        </span>
                    </div>
                    <div class="col-xs-4 col-sm-5 c-error">{{ $errors->first('factory_id') }}</div>
                </div>

                <div class="row cl">
                    <label class="form-label col-xs-2 col-sm-1"><span class="c-red">*</span>车型名：</label>
                    <div class="formControls col-xs-4 col-sm-5">
                        <input type="text" class="input-text" name="name" value="{{ old('name') }}">
                    </div>
                    <div class="col-xs-4 col-sm-5 c-error">{{ $errors->first('name') }}</div>
                </div>

                <div class="row cl">
                    <div class="col-xs-8 col-sm-9 col-xs-offset-2 col-sm-offset-1">
                        <button class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 保存并提交</button>
                    </div>
                </div>

            </form>
        </div>
    </section>
@endsection